﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ongoal.Quotation
{
    /// <summary>
    /// Jwt配置
    /// </summary>
    public class JwtConfig
    {
        /// <summary>
        /// 签发方
        /// </summary>
        public string Issuer { get; set; } = "Ongoal";
        /// <summary>
        /// 接受方
        /// </summary>
        public string Audience { get; set; } = "Audience User";

        /// <summary>
        /// 加密key
        /// </summary>
        public string SecretKey { get; set; } = Des.DefaultKEY;
        /// <summary>
        /// 生命周期
        /// </summary>
        public int Lifetime { get; set; } = 24;
        /// <summary>
        /// 是否验证生命周期
        /// </summary>
        public bool ValidateLifetime { get; set; } = true;
        /// <summary>
        /// 验证头字段
        /// </summary>
        public string HeadField { get; set; } = "Token";
        /// <summary>
        /// jwt验证前缀
        /// </summary>
        public string Prefix { get; set; } = "Bearer";
        /// <summary>
        /// 忽略验证的url
        /// </summary>
        public List<string> IgnoreUrls { get; set; }
        /// <summary>
        /// 是否兼容Java
        /// </summary>
        public bool NoCodeKey { get; set; } = true;
    }
}
